<script>
	import * as RongIMLib from '@rongcloud/imlib-next';
	export default {
		data() {
			return {
				globalData: {
					system: '',
					capsule: ''
				},
				messagenum: 0
			};
		},
		methods: {
			getunmessagenum() {}
		},
		onLaunch: function() {
			// 获取系统的状态栏高度
			uni.getSystemInfo({
				success: (res) => {
					this.globalData.system = res;
				}
			});
			// 获取胶囊信息
			this.globalData.capsule = uni.getMenuButtonBoundingClientRect();
			// 初始化IM
			RongIMLib.init({
				appkey: 'pwe86ga5pnw76'
			});

			if (uni.getStorageSync('rong_token')) {
				this.utilim.connect(uni.getStorageSync('rong_token'));
				this.utilim.addEventListener();
			}
		},
		onShow: function() {},
		onHide: function() {}
	};
</script>

<style lang="scss">
	/*每个页面公共css */
	@import '@/uni_modules/uni-scss/index.scss';
	/* #ifndef APP-NVUE */
	@import '@/static/customicons.css';

	// 设置整个项目的背景色
	page {
		background-color: #fff;
	}

	/* #endif */
	.example-info {
		font-size: 14px;
		color: #333;
		padding: 10px;
	}

	::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
		color: transparent;
	}
</style>